<template>
    <div class="my-input">
        <h1>我是组件2</h1>
        <input type="text" v-model="num">
    </div>
</template>
<script>
export default {
    data() {
        return {
            num:10
        }
    },
    activated() {
        console.log('myInput2组件激活')
    },
     deactivated() {
        console.log('myInput2组件停用')
    },
}
</script>